package  com.songyl.patternLearn.AdapterPattern;

abstract class  Player {
    //生命值
    protected float HP=100;

    //游戏状态 HP<=0  isAlive=false
    public boolean isAlive=true;

    protected float getHP() {
        return HP;
    }

    protected void setHP(float HP) {
        this.HP = HP;
    }

    public boolean isAlive() {
        return HP>0;
    }

    public void setAlive(boolean alive) {
        isAlive = alive;
    }

    boolean play(){return false;}
}
